package com.giscloud.amp.entity.vo;

import cn.hutool.core.date.DateUtil;
import com.giscloud.amp.entity.SysRegister;

/**
 * @Author:gxd
 * @Description:
 * @Date: 10:16 2018/2/26
 * @Modified By:
 */
public class SysRegisterVO extends SysRegister {
    private String createdDtDesc;
    private String tokenExpDtDesc;
    private String statusCdDesc;
    private String forceAuthDesc;

    public String getForceAuthDesc() {
        if(super.getForceAuth() != null ){
            if (super.getForceAuth().equals("1")) {
                return "是";
            } else if (super.getForceAuth().equals("0")) {
                return "否";
            } else {
                return "";
            }
        }else{
            return "";
        }
    }

    public void setForceAuthDesc(String forceAuthDesc) {
        this.forceAuthDesc = forceAuthDesc;
    }

    public String getTokenExpDtDesc() {
        if(super.getTokenExpDt() != null){
            return DateUtil.format(super.getTokenExpDt(),"yyyy-MM-dd");
        }
        return "";
    }

    public void setTokenExpDtDesc(String tokenExpDtDesc) {
        this.tokenExpDtDesc = tokenExpDtDesc;
    }

    public String getCreatedDtDesc() {
        if(super.getCreatedDt() != null){
            return DateUtil.format(super.getCreatedDt(),"yyyy-MM-dd");
        }
        return "";
    }

    public void setCreatedDtDesc(String createdDtDesc) {
        this.createdDtDesc = createdDtDesc;
    }

    public String getStatusCdDesc() {
        if(super.getStatusCd() != null ){
            if (super.getStatusCd().equals((short)1)) {
                return "有效";
            } else if (super.getStatusCd().equals((short)0)) {
                return "无效";
            } else {
                return "";
            }
        }else{
            return "";
        }

    }

    public void setStatusCdDesc(String statusCdDesc) {
        this.statusCdDesc = statusCdDesc;
    }
}
